<?php $this->load->view('Pre/common/header.html');?>
<!--导航 begin-->
<div class="nav">
    <ul>
        <li class="cur">
            <span>商城</span>
            <a href="<?php echo site_url('shop/index')?>">MALL</a>
        </li>
        <li>
            <span>定制</span>
            <a href="">CUSTOM-MADE</a>
        </li>
    </ul>
</div>
<!--导航 end-->
<!--banner begin-->
<div class="banner">
    <ul>
        <li style="background: url('<?php echo base_url('common/home')?>/img/banner/banner01.jpg') no-repeat;"></li>
        <li style="background: url('<?php echo base_url('common/home')?>/img/banner/banner02.jpg') no-repeat;"></li>
        <li style="background: url('<?php echo base_url('common/home')?>/img/banner/banner03.jpg') no-repeat;"></li>
    </ul>
</div>
<!--banner end-->

<?php $this->load->view('Pre/common/search.html')?>
<!--热销产品 begin-->
<div class="hotSale">
    <div class="hotSaleTitle">
        热销产品
        <span>HOT - SALE</span>
    </div>

    <div class="h1290">
        <!--促销商品 begin-->
        <div class="h1290Left">
            <?php foreach($discount_goods as $discount_goodsitem):?>
            <div class="w504">
                <a class="leftHotSale" href="<?php echo site_url('goods/details/'.$discount_goodsitem->goods_id)?>">
                    <img src="<?php echo base_url().$discount_goodsitem->thumbnail_img?>" width="253" height="354" alt="" />
                    <div class="money">
                        <div class="discount">原价<span><?php echo $discount_goodsitem->discount*10?>%</span></div>
                        <div class="bgNowPrice">￥<?php echo  round($discount_goodsitem->shop_price*$discount_goodsitem->discount*0.1, 2)?></div>
                    </div>
                    <div class="hotSaleTips">
                        <span>恋上冬季</span>
                        这个冬季用性感包裹，你不再寒冷
                    </div>

                   
                </a>
                <img onclick="add_cart_from_shop('<?php echo $discount_goodsitem->goods_id?>')" class="addCart" src="<?php echo base_url('common/home')?>/img/che2.png" width="68" height="42" alt="" />
                <div class="rightHotSale">
                    <h1><?php echo $discount_goodsitem->title?></h1>
                    <div class="oriPrice">￥<?php echo $discount_goodsitem->shop_price?></div>
                   
                </div>
            </div>
            <?php endforeach;?>
            <script type="text/javascript" src="<?php echo base_url()?>common/js/jquery.Msg.js"></script>
            <script type="text/javascript">
                function add_cart_from_shop(goods_id)
                {
                    var url = "<?php echo base_url()?>" + "cart/add_cart_from_shop.html";
                    $.post(url, { 'goodsid': goods_id,'backurl':window.location.href }, function (data) {
                        var jsonData = $.parseJSON(data);
                        if (jsonData.Statu == 'ok') {
                            var old_count = parseInt($(".logoAndLogin .cart").find('span').text());
                            $(".logoAndLogin .cart").find('span').text(old_count + 1)
                            $.Success(jsonData);
                        } else {
                            $.Success(jsonData);
                        }
                    });
                }
            </script>
        </div>
        <!--促销商品 end-->
        <!--右边6个 begin-->
        <div class="h1290Right">
            <ul>
                <?php foreach($hot_goods as $hot_goodsitem):?>
                <li>
                    <a href="<?php echo site_url('goods/details/'.$hot_goodsitem->goods_id)?>">
                        <img src="<?php echo base_url().$discount_goodsitem->thumbnail_img?>" width="253" height="354" alt="<?php echo $hot_goodsitem->title?>" />
                        <h1><?php echo $hot_goodsitem->title?></h1>
                        <div class="nowPrice">￥<?php echo $hot_goodsitem->shop_price?></div>
                        <div class="clear"></div>
                    </a>
                    <img class="addCart" onclick="add_cart_from_shop('<?php echo $hot_goodsitem->goods_id?>')" src="<?php echo base_url('common/home')?>/img/che2.png" width="68" height="42" alt="<?php echo $hot_goodsitem->title?>" />
                </li>
                <?php endforeach;?>
            </ul>
        </div>
        <!--右边6个 end-->
    </div>
</div>
<!--热销产品 end-->
<!--最新产品 begin-->
<div class="newSale">
    <div class="newSaleTitle">
        最新产品
        <span>NEW PRODUCTS</span>
    </div>

    <div class="newSaleLists">
        <ul>
            <?php foreach($new_goodsList as $new_goodsitem):?>
            <li>
                <a href="<?php echo site_url('goods/details/'.$new_goodsitem->goods_id)?>">
                    <img src="<?php echo base_url().$new_goodsitem->thumbnail_img?>" width="253" height="354" alt="<?php echo $new_goodsitem->title?>" />
                    <h1><?php echo $new_goodsitem->title?></h1>
                    <div class="nowPrice">￥<?php echo $new_goodsitem->shop_price?></div>
                    <div class="clear"></div>
                  
                </a>
                <img onclick="add_cart_from_shop('<?php echo $new_goodsitem->goods_id?>')" class="addCart" src="<?php echo base_url('common/home')?>/img/che2.png" width="68" height="42" alt="<?php echo $new_goodsitem->title?>" />
            </li>
            <?php endforeach;?>
        </ul>
    </div>

    <div class="fenye">
        <?php echo $links?>
    </div>
</div>
<!--最新产品 end-->
<?php $this->load->view('Pre/common/footer.html');?>